.class public abstract Lcom/permission/runtime/ESPermissionActivity;
.super Lcom/permission/runtime/BasePermissionActivity;
.source "ESPermissionActivity.java"


# instance fields
.field private a:Z

.field private b:Z

.field private c:Z

.field private d:Landroid/app/AlertDialog;

.field private e:Landroid/app/AlertDialog;

.field public f:Z


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 1
    invoke-direct {p0}, Lcom/permission/runtime/BasePermissionActivity;-><init>()V

    const/4 v0, 0x0

    .line 2
    iput-boolean v0, p0, Lcom/permission/runtime/ESPermissionActivity;->a:Z

    .line 3
    iput-boolean v0, p0, Lcom/permission/runtime/ESPermissionActivity;->b:Z

    .line 4
    iput-boolean v0, p0, Lcom/permission/runtime/ESPermissionActivity;->c:Z

    .line 5
    iput-boolean v0, p0, Lcom/permission/runtime/ESPermissionActivity;->f:Z

    return-void
.end method

.method private A()V
    .locals 5

    .line 1
    invoke-static {}, Lcom/permission/runtime/d;->e()Lcom/permission/runtime/d;

    move-result-object v0

    invoke-virtual {v0}, Lcom/permission/runtime/d;->c()Z

    move-result v0

    .line 2
    invoke-static {}, Lcom/permission/runtime/d;->e()Lcom/permission/runtime/d;

    move-result-object v1

    invoke-virtual {v1}, Lcom/permission/runtime/d;->d()Z

    move-result v1

    .line 3
    invoke-static {}, Lcom/permission/runtime/f;->a()[Ljava/lang/String;

    move-result-object v2

    .line 4
    invoke-static {p0, v2}, Lcom/permission/runtime/f;->a(Landroid/content/Context;[Ljava/lang/String;)Z

    move-result v3

    const/4 v4, 0x1

    if-nez v3, :cond_1

    .line 5
    iget-boolean v0, p0, Lcom/permission/runtime/ESPermissionActivity;->b:Z

    if-nez v0, :cond_4

    .line 6
    iput-boolean v4, p0, Lcom/permission/runtime/ESPermissionActivity;->b:Z

    .line 7
    invoke-virtual {p0}, Lcom/permission/runtime/ESPermissionActivity;->u()Z

    move-result v0

    const/16 v1, 0x64

    if-eqz v0, :cond_0

    .line 8
    invoke-direct {p0, v1, v4, v2}, Lcom/permission/runtime/ESPermissionActivity;->b(IZ[Ljava/lang/String;)V

    .line 9
    invoke-virtual {p0, v4}, Lcom/permission/runtime/ESPermissionActivity;->f(Z)V

    goto :goto_0

    .line 10
    :cond_0
    invoke-direct {p0, v1, v4, v2}, Lcom/permission/runtime/ESPermissionActivity;->a(IZ[Ljava/lang/String;)V

    const/4 v0, 0x0

    .line 11
    invoke-virtual {p0, v0}, Lcom/permission/runtime/ESPermissionActivity;->f(Z)V

    goto :goto_0

    :cond_1
    if-eqz v0, :cond_2

    goto :goto_0

    :cond_2
    if-eqz v1, :cond_3

    goto :goto_0

    .line 12
    :cond_3
    iget-boolean v0, p0, Lcom/permission/runtime/ESPermissionActivity;->a:Z

    if-nez v0, :cond_4

    .line 13
    iput-boolean v4, p0, Lcom/permission/runtime/ESPermissionActivity;->a:Z

    .line 14
    invoke-virtual {p0}, Lcom/permission/runtime/ESPermissionActivity;->x()V

    :cond_4
    :goto_0
    return-void
.end method

.method private B()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/permission/runtime/ESPermissionActivity;->e:Landroid/app/AlertDialog;

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0}, Landroid/app/AlertDialog;->dismiss()V

    const/4 v0, 0x0

    .line 3
    iput-object v0, p0, Lcom/permission/runtime/ESPermissionActivity;->e:Landroid/app/AlertDialog;

    :cond_0
    return-void
.end method

.method private C()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/permission/runtime/ESPermissionActivity;->d:Landroid/app/AlertDialog;

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0}, Landroid/app/AlertDialog;->dismiss()V

    const/4 v0, 0x0

    .line 3
    iput-object v0, p0, Lcom/permission/runtime/ESPermissionActivity;->d:Landroid/app/AlertDialog;

    :cond_0
    return-void
.end method

.method private D()V
    .locals 1

    const/4 v0, 0x0

    .line 1
    iput-boolean v0, p0, Lcom/permission/runtime/ESPermissionActivity;->b:Z

    return-void
.end method

.method static synthetic a(Lcom/permission/runtime/ESPermissionActivity;)Landroid/app/AlertDialog;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/permission/runtime/ESPermissionActivity;->e:Landroid/app/AlertDialog;

    return-object p0
.end method

.method static synthetic a(Lcom/permission/runtime/ESPermissionActivity;Landroid/app/AlertDialog;)Landroid/app/AlertDialog;
    .locals 0

    .line 2
    iput-object p1, p0, Lcom/permission/runtime/ESPermissionActivity;->e:Landroid/app/AlertDialog;

    return-object p1
.end method

.method private varargs a(IZ[Ljava/lang/String;)V
    .locals 5

    .line 9
    invoke-direct {p0}, Lcom/permission/runtime/ESPermissionActivity;->C()V

    .line 10
    iget-object v0, p0, Lcom/permission/runtime/ESPermissionActivity;->e:Landroid/app/AlertDialog;

    const/4 v1, 0x0

    if-nez v0, :cond_1

    .line 11
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v2, 0x15

    if-lt v0, v2, :cond_0

    .line 12
    new-instance v0, Landroid/app/AlertDialog$Builder;

    const v2, 0x1030011

    invoke-direct {v0, p0, v2}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;I)V

    goto :goto_0

    .line 13
    :cond_0
    new-instance v0, Landroid/app/AlertDialog$Builder;

    invoke-direct {v0, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 14
    :goto_0
    invoke-static {p0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v2

    sget v3, Lcom/permission/runtime/m;->dialog_ask_rationale:I

    const/4 v4, 0x0

    invoke-virtual {v2, v3, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v2

    .line 15
    sget v3, Lcom/permission/runtime/l;->txt_grant:I

    invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    .line 16
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v0

    iput-object v0, p0, Lcom/permission/runtime/ESPermissionActivity;->e:Landroid/app/AlertDialog;

    .line 17
    invoke-virtual {v0, v1}, Landroid/app/AlertDialog;->setCancelable(Z)V

    .line 18
    iget-object v0, p0, Lcom/permission/runtime/ESPermissionActivity;->e:Landroid/app/AlertDialog;

    invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V

    .line 19
    iget-object v0, p0, Lcom/permission/runtime/ESPermissionActivity;->e:Landroid/app/AlertDialog;

    invoke-virtual {v0}, Landroid/app/AlertDialog;->getWindow()Landroid/view/Window;

    move-result-object v0

    invoke-virtual {v0, v2}, Landroid/view/Window;->setContentView(Landroid/view/View;)V

    .line 20
    new-instance v0, Lcom/permission/runtime/ESPermissionActivity$a;

    invoke-direct {v0, p0, p2, p3, p1}, Lcom/permission/runtime/ESPermissionActivity$a;-><init>(Lcom/permission/runtime/ESPermissionActivity;Z[Ljava/lang/String;I)V

    invoke-virtual {v3, v0}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto :goto_1

    .line 21
    :cond_1
    invoke-virtual {v0, v1}, Landroid/app/AlertDialog;->setCancelable(Z)V

    .line 22
    iget-object p1, p0, Lcom/permission/runtime/ESPermissionActivity;->e:Landroid/app/AlertDialog;

    invoke-virtual {p1}, Landroid/app/AlertDialog;->show()V

    .line 23
    :goto_1
    iput-boolean v1, p0, Lcom/permission/runtime/ESPermissionActivity;->f:Z

    return-void
.end method

.method private a([Ljava/lang/String;)V
    .locals 1
    .param p1    # [Ljava/lang/String;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 4
    invoke-static {}, Lcom/permission/runtime/f;->a()[Ljava/lang/String;

    move-result-object v0

    .line 5
    invoke-static {p1}, Ljava/util/Arrays;->sort([Ljava/lang/Object;)V

    .line 6
    invoke-static {v0}, Ljava/util/Arrays;->sort([Ljava/lang/Object;)V

    .line 7
    invoke-static {p1, v0}, Ljava/util/Arrays;->equals([Ljava/lang/Object;[Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_0

    const/4 p1, 0x0

    .line 8
    invoke-virtual {p0, p1}, Lcom/permission/runtime/ESPermissionActivity;->f(Z)V

    :cond_0
    return-void
.end method

.method static synthetic a(Lcom/permission/runtime/ESPermissionActivity;Z)Z
    .locals 0

    .line 3
    iput-boolean p1, p0, Lcom/permission/runtime/ESPermissionActivity;->b:Z

    return p1
.end method

.method private varargs b(IZ[Ljava/lang/String;)V
    .locals 5

    .line 1
    iget-object v0, p0, Lcom/permission/runtime/ESPermissionActivity;->d:Landroid/app/AlertDialog;

    const/4 v1, 0x0

    if-nez v0, :cond_1

    .line 2
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v2, 0x15

    if-lt v0, v2, :cond_0

    .line 3
    new-instance v0, Landroid/app/AlertDialog$Builder;

    const v2, 0x1030011

    invoke-direct {v0, p0, v2}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;I)V

    goto :goto_0

    .line 4
    :cond_0
    new-instance v0, Landroid/app/AlertDialog$Builder;

    invoke-direct {v0, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 5
    :goto_0
    invoke-static {p0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v2

    sget v3, Lcom/permission/runtime/m;->dialog_full_screen_ask_rarionale:I

    const/4 v4, 0x0

    invoke-virtual {v2, v3, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v2

    .line 6
    sget v3, Lcom/permission/runtime/l;->txt_grant:I

    invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    .line 7
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v0

    iput-object v0, p0, Lcom/permission/runtime/ESPermissionActivity;->d:Landroid/app/AlertDialog;

    .line 8
    invoke-virtual {v0, v1}, Landroid/app/AlertDialog;->setCancelable(Z)V

    .line 9
    iget-object v0, p0, Lcom/permission/runtime/ESPermissionActivity;->d:Landroid/app/AlertDialog;

    invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V

    .line 10
    iget-object v0, p0, Lcom/permission/runtime/ESPermissionActivity;->d:Landroid/app/AlertDialog;

    invoke-virtual {v0}, Landroid/app/AlertDialog;->getWindow()Landroid/view/Window;

    move-result-object v0

    invoke-virtual {v0, v2}, Landroid/view/Window;->setContentView(Landroid/view/View;)V

    .line 11
    new-instance v0, Lcom/permission/runtime/ESPermissionActivity$b;

    invoke-direct {v0, p0, p2, p3, p1}, Lcom/permission/runtime/ESPermissionActivity$b;-><init>(Lcom/permission/runtime/ESPermissionActivity;Z[Ljava/lang/String;I)V

    invoke-virtual {v3, v0}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto :goto_1

    .line 12
    :cond_1
    invoke-virtual {v0, v1}, Landroid/app/AlertDialog;->setCancelable(Z)V

    .line 13
    iget-object p1, p0, Lcom/permission/runtime/ESPermissionActivity;->d:Landroid/app/AlertDialog;

    invoke-virtual {p1}, Landroid/app/AlertDialog;->show()V

    :goto_1
    const/4 p1, 0x1

    .line 14
    iput-boolean p1, p0, Lcom/permission/runtime/ESPermissionActivity;->f:Z

    return-void
.end method

.method private g(Z)V
    .locals 0

    .line 1
    iput-boolean p1, p0, Lcom/permission/runtime/ESPermissionActivity;->c:Z

    return-void
.end method

.method private y()V
    .locals 3

    .line 1
    invoke-static {}, Lcom/permission/runtime/f;->a()[Ljava/lang/String;

    move-result-object v0

    .line 2
    invoke-static {p0, v0}, Lcom/permission/runtime/f;->a(Landroid/content/Context;[Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 3
    invoke-static {}, Lcom/permission/runtime/d;->e()Lcom/permission/runtime/d;

    move-result-object v0

    invoke-virtual {v0}, Lcom/permission/runtime/d;->c()Z

    move-result v0

    const/4 v1, 0x1

    if-eqz v0, :cond_0

    .line 4
    invoke-static {p0}, Lcom/permission/runtime/f;->a(Landroid/content/Context;)Z

    move-result v0

    goto :goto_0

    :cond_0
    const/4 v0, 0x1

    .line 5
    :goto_0
    invoke-static {}, Lcom/permission/runtime/d;->e()Lcom/permission/runtime/d;

    move-result-object v2

    invoke-virtual {v2}, Lcom/permission/runtime/d;->d()Z

    move-result v2

    if-eqz v2, :cond_1

    .line 6
    invoke-static {p0}, Lcom/permission/runtime/f;->c(Landroid/content/Context;)Z

    move-result v2

    goto :goto_1

    :cond_1
    const/4 v2, 0x1

    :goto_1
    if-eqz v0, :cond_2

    if-eqz v2, :cond_2

    .line 7
    iput-boolean v1, p0, Lcom/permission/runtime/ESPermissionActivity;->a:Z

    .line 8
    invoke-direct {p0, v1}, Lcom/permission/runtime/ESPermissionActivity;->g(Z)V

    .line 9
    invoke-virtual {p0}, Lcom/permission/runtime/ESPermissionActivity;->x()V

    :cond_2
    return-void
.end method

.method private z()V
    .locals 1

    .line 1
    invoke-virtual {p0}, Lcom/permission/runtime/ESPermissionActivity;->v()Z

    move-result v0

    if-nez v0, :cond_0

    .line 2
    invoke-direct {p0}, Lcom/permission/runtime/ESPermissionActivity;->A()V

    :cond_0
    return-void
.end method


# virtual methods
.method public a(ZZ)V
    .locals 0

    return-void
.end method

.method protected b(ZZ)V
    .locals 0

    if-nez p1, :cond_0

    if-eqz p2, :cond_1

    :cond_0
    const/4 p1, 0x0

    .line 15
    iput-boolean p1, p0, Lcom/permission/runtime/ESPermissionActivity;->b:Z

    .line 16
    :cond_1
    invoke-direct {p0}, Lcom/permission/runtime/ESPermissionActivity;->C()V

    .line 17
    invoke-direct {p0}, Lcom/permission/runtime/ESPermissionActivity;->B()V

    .line 18
    invoke-static {}, Lcom/permission/runtime/d;->e()Lcom/permission/runtime/d;

    move-result-object p1

    invoke-virtual {p1}, Lcom/permission/runtime/d;->b()I

    move-result p1

    const/4 p2, 0x1

    if-eq p1, p2, :cond_2

    .line 19
    invoke-direct {p0}, Lcom/permission/runtime/ESPermissionActivity;->z()V

    :cond_2
    return-void
.end method

.method public f(Z)V
    .locals 0

    return-void
.end method

.method public onConfigurationChanged(Landroid/content/res/Configuration;)V
    .locals 4

    .line 1
    invoke-super {p0, p1}, Lcom/permission/runtime/BasePermissionActivity;->onConfigurationChanged(Landroid/content/res/Configuration;)V

    .line 2
    iget-object v0, p0, Lcom/permission/runtime/ESPermissionActivity;->d:Landroid/app/AlertDialog;

    const/4 v1, 0x1

    const/4 v2, 0x0

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Landroid/app/AlertDialog;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    .line 3
    :goto_0
    iget-object v3, p0, Lcom/permission/runtime/ESPermissionActivity;->e:Landroid/app/AlertDialog;

    if-eqz v3, :cond_1

    invoke-virtual {v3}, Landroid/app/AlertDialog;->isShowing()Z

    move-result v3

    if-eqz v3, :cond_1

    goto :goto_1

    :cond_1
    const/4 v1, 0x0

    .line 4
    :goto_1
    invoke-virtual {p0}, Landroidx/appcompat/app/AppCompatActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const/4 v3, 0x0

    invoke-virtual {v2, p1, v3}, Landroid/content/res/Resources;->updateConfiguration(Landroid/content/res/Configuration;Landroid/util/DisplayMetrics;)V

    .line 5
    invoke-virtual {p0, v0, v1}, Lcom/permission/runtime/ESPermissionActivity;->b(ZZ)V

    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 0

    .line 1
    :try_start_0
    invoke-super {p0, p1}, Lcom/permission/runtime/BasePermissionActivity;->onCreate(Landroid/os/Bundle;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 2
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    .line 3
    :goto_0
    invoke-direct {p0}, Lcom/permission/runtime/ESPermissionActivity;->y()V

    return-void
.end method

.method protected onDestroy()V
    .locals 0

    .line 1
    invoke-super {p0}, Landroidx/appcompat/app/AppCompatActivity;->onDestroy()V

    .line 2
    invoke-direct {p0}, Lcom/permission/runtime/ESPermissionActivity;->B()V

    .line 3
    invoke-direct {p0}, Lcom/permission/runtime/ESPermissionActivity;->C()V

    return-void
.end method

.method public onRequestPermissionsResult(I[Ljava/lang/String;[I)V
    .locals 1
    .param p2    # [Ljava/lang/String;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p3    # [I
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    const/16 v0, 0x64

    if-ne p1, v0, :cond_1

    .line 1
    invoke-static {p3}, Lcom/permission/runtime/f;->a([I)Z

    move-result p3

    if-nez p3, :cond_0

    .line 2
    invoke-virtual {p0}, Lcom/permission/runtime/ESPermissionActivity;->w()V

    .line 3
    invoke-static {p0, p2}, Lcom/permission/runtime/f;->a(Landroid/app/Activity;[Ljava/lang/String;)Z

    move-result p3

    .line 4
    invoke-direct {p0, p1, p3, p2}, Lcom/permission/runtime/ESPermissionActivity;->a(IZ[Ljava/lang/String;)V

    .line 5
    invoke-direct {p0, p2}, Lcom/permission/runtime/ESPermissionActivity;->a([Ljava/lang/String;)V

    goto :goto_0

    .line 6
    :cond_0
    invoke-direct {p0}, Lcom/permission/runtime/ESPermissionActivity;->C()V

    .line 7
    invoke-direct {p0}, Lcom/permission/runtime/ESPermissionActivity;->D()V

    goto :goto_0

    .line 8
    :cond_1
    invoke-super {p0, p1, p2, p3}, Landroidx/fragment/app/FragmentActivity;->onRequestPermissionsResult(I[Ljava/lang/String;[I)V

    :goto_0
    return-void
.end method

.method protected onResume()V
    .locals 2

    .line 1
    invoke-super {p0}, Landroidx/fragment/app/FragmentActivity;->onResume()V

    .line 2
    invoke-static {}, Lcom/permission/runtime/d;->e()Lcom/permission/runtime/d;

    move-result-object v0

    invoke-virtual {v0}, Lcom/permission/runtime/d;->b()I

    move-result v0

    const/4 v1, 0x1

    if-eq v0, v1, :cond_0

    .line 3
    invoke-direct {p0}, Lcom/permission/runtime/ESPermissionActivity;->z()V

    :cond_0
    return-void
.end method

.method public u()Z
    .locals 1

    const/4 v0, 0x0

    return v0
.end method

.method protected v()Z
    .locals 1

    .line 1
    iget-boolean v0, p0, Lcom/permission/runtime/ESPermissionActivity;->c:Z

    return v0
.end method

.method protected w()V
    .locals 2

    .line 1
    invoke-static {}, Lcom/permission/runtime/d;->e()Lcom/permission/runtime/d;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/permission/runtime/d;->a(I)V

    .line 2
    invoke-static {}, Lcom/permission/runtime/d;->e()Lcom/permission/runtime/d;

    move-result-object v0

    invoke-virtual {v0}, Lcom/permission/runtime/d;->a()V

    return-void
.end method

.method protected x()V
    .locals 2

    .line 1
    invoke-static {}, Lcom/permission/runtime/d;->e()Lcom/permission/runtime/d;

    move-result-object v0

    invoke-virtual {v0}, Lcom/permission/runtime/d;->b()I

    move-result v0

    const/4 v1, 0x1

    if-eq v0, v1, :cond_0

    .line 2
    invoke-static {}, Lcom/permission/runtime/d;->e()Lcom/permission/runtime/d;

    move-result-object v0

    invoke-virtual {v0, v1}, Lcom/permission/runtime/d;->a(I)V

    :cond_0
    return-void
.end method
